<template>
  <view
    class="goods-shop"
    v-if="showGoodsShopEntry && mch"
    :style="[outModuleCss]"
  >
    <view :style="[moduleBgCss]" class="module-bg"></view>
    <view class="shop-section">
      <view class="shop-info">
        <view class="info-box">
          <view class="shop-img">
               <image :src="mch.logo" alt="">
          </view>
          <view class="detail-box">
            <view class="shop-name">{{mch.name}}</view>
            <view class="shop-focus">{{mch.favorite_num}}{{$t('goods.attentionNum')}}</view>
          </view>
        </view>
        <i class="iconfont icon-arrow-right"></i>
      </view>
      <view class="btn-group">
        <view class="btn-item">
          <i class="iconfont icon-all"></i>
          <text>{{$t('diy.goods')}}</text>
        </view>
        <view class="btn-item" @click="$utils.toUrl('/mch/shop/shop?mch_id='+mch.id,'navigate')">
          <i class="iconfont icon-store"></i>
          <text>{{$t('goods.inShop')}}</text>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import { diySysPageMixin } from "@/components/diySystemPage/mixins/index.js";

export default {
  name: "",
  props: {
    propsData: {
      type: Object,
      default: {},
    },
    mch: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  mixins: [diySysPageMixin],
  components: {},
  data() {
    return {};
  },
  mounted() {},
  watch: {},
  computed: {
    showGoodsShopEntry() {
      return this.propsData.params.showGoodsShopEntry;
    },
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.goods-shop {
  width: 100%;
  position: relative;
  font-family: PingFang SC;
  .shop-section {
    width: 100%;
    padding: 5.34vw 4.8vw;
    .shop-info {
      display: flex;
      justify-content: space-between;
      align-items: center;
      .info-box {
        display: flex;
        align-items: center;
        .shop-img {
          width: 13.33vw;
          height: 13.33vw;
          background: #ffffff;
          border: 1px solid #f6f6f6;
          margin-right: 2.67vw;
          image {
            width: 100%;
            height: 100%;
            border-radius: 1.067vw;
            display: block;
          }
        }
        .detail-box {
          display: flex;
          flex-direction: column;
          .shop-name {
            font-size: 26rpx;
            font-weight: 600;
            color: #262626;
          }
          .shop-focus {
            font-size: 22rpx;
            font-weight: 400;
            color: #8c8c8c;
            margin-top: 2.67vw;
          }
          p {
            margin-bottom: 0;
          }
        }
      }
      .iconfont {
        color: #000000;
        font-size: 22rpx;
      }
    }
    .btn-group {
      display: flex;
      justify-content: center;
      align-items: center;
      margin-top: 3.73vw;
      .btn-item {
        width: 26.67vw;
        height: 8vw;
        background: #ffffff;
        border: 1px solid #9b9b9b;
        border-radius: 4vw;
        display: flex;
        justify-content: center;
        align-items: center;
        color: #262626;
        .iconfont {
          font-size: 34rpx;
          margin-right: 4rpx;
        }
        span {
          font-size: 24rpx;
          font-weight: 400;
        }
      }
      .btn-item:first-child {
        margin-right: 4.53vw;
      }
    }
  }
  .module-bg {
    width: 100%;
    height: 100%;
    z-index: -1;
    position: absolute;
    left: 0;
    top: 0;
  }
}
</style>
